<?php

namespace app\modules\Admin\models;

use Yii;

/**
 * This is the model class for table "photo".
 *
 * @property int $id
 * @property string|null $url
 * @property string|null $name
 * @property int|null $status 1 正常  2 禁用
 */
class Photo extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'photo';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['status'], 'integer'],
            [['url'], 'string', 'max' => 512],
            [['name'], 'string', 'max' => 64],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => '编号',
            'url' => '图片',
            'name' => '名称',
            'status' => '状态',
        ];
    }
}
